package com.it135.citytraffic.pojo.entity;


import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

import java.io.Serial;
import java.io.Serializable;


@TableName("api_key")
@Data
public class ApiKey implements Serializable {
    @Value(value = "${static.times}")
    private static  Integer times;

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String name;

    private String apiKey;

    /**
     * 判断api次数是否消耗完,0不可用,1可用
     */


    @Override
    public String toString() {
        return "ApiKey{" +
            "id=" + id +
            ", name=" + name +
            ", apiKey=" + apiKey +

        "}";
    }
}
